﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using VOL;
using System.Data;

namespace WebQuyPhong.Admin
{
    public partial class QuyPhongManager : System.Web.UI.Page
    {
        QuyPhongBL _quyPhongBLL = new QuyPhongBL();
        int namhientai = int.Parse(DateTime.Now.Year.ToString());

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                FillData(namhientai);
            }
        }

        private void FillData(int nam)
        {
            DataTable dt = _quyPhongBLL.GetData(nam);

            lblSoTienNamTruoc.Text = dt.Rows[0]["SOTIENNAMTRUOC"].ToString();
            lblSoTienThuCB.Text = dt.Rows[0]["SOTIENTHUCB"].ToString();

            lblSoTienThuKhac.Text = dt.Rows[0]["SOTIENTHUKHAC"].ToString();
            lblSoTienChi.Text = dt.Rows[0]["SOTIENCHI"].ToString();
            lblSoTienConLai.Text = dt.Rows[0]["SOTIENCONLAI"].ToString();
            
        }
    }
}